<?php

if (!defined('ROOT'))
    die();

class Adminarea_main {

    public function init() {
	if (isset($_GET['mainmod'])) {
	    $pages = Aurus::getInstance()->getAdminConfigPageRows();
	    include ( $pages[$_GET['mainmod']][1] );
	} else {
	    $rows = '';
	    foreach (Aurus::getInstance()->getAdminConfigPageRows() as $mod => $nfo) {
		list ($name, $incfile) = $nfo;

		$rows .= Html::tr(
				Html::tag(
					Html::tag($name, 'a', array('href' => LINK_ROOT . 'adminarea/?do=main&amp;mainmod=' . $mod)),
					'td', array('class' => 'confclass')
				)
		);
	    }
	    Aurus::getInstance()->addContent(Html::table($rows));
	}
    }

}